package com.xyx.ssm.jdbcdao;


import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.xyx.ssm.po.WineBrand;
import com.xyx.ssm.po.purchaseordersub;


@Repository
public class PurchaseorderDao extends BaseDao{
	public Map<String,Object> selpurchaseordersub(Integer phoid){
		List<Map<String, Object>> list=sqlSession.selectList("com.xyx.ssm.jdbcdao.PurchaseorderDao.selpurchaseordersub",phoid);
		
		return list.get(0);		
	}
	public List<Map<String,Object>> selwine(int phoid){
		List<Map<String,Object>> list=sqlSession.selectList("com.xyx.ssm.jdbcdao.PurchaseorderDao.selwine", phoid);
		
		return list;
		
	}
	public List<Map<String,Object>> selallwine(){
		List<Map<String,Object>> list=sqlSession.selectList("com.xyx.ssm.jdbcdao.PurchaseorderDao.selallwine");
		return list;
	}
	public List<purchaseordersub> selwine111(){
		List<purchaseordersub> list=sqlSession.selectList("com.xyx.ssm.jdbcdao.PurchaseorderDao.selwine111");
		return list;
	}
	public int updatewinenum(purchaseordersub pur){
		int num=sqlSession.update("com.xyx.ssm.jdbcdao.PurchaseorderDao.updatewinenum",pur);
		return num;
	}
	public int insertpurchaseordersub(purchaseordersub pur){
		int num=sqlSession.insert("com.xyx.ssm.jdbcdao.PurchaseorderDao.insertpurchaseordersub",pur);
		return num;
	}
}
